<?php
require_once 'config.php';

$stmt = $conn->prepare("DELETE FROM users WHERE is_verified = 0 AND registration_time < DATE_SUB(NOW(), INTERVAL 1 HOUR)");
$stmt->execute();
$affected_rows = $stmt->affected_rows;
$stmt->close();

echo "清理完成，删除了 $affected_rows 条过期未激活的记录。";
?>